Fri Jul 12 15:40:31 2024
# cell chat results per condition
cellchat <- readRDS('/data/local/buyar/collaborations/marina_kol/single_cell_analysis/find_cell_communication/cellChat_by_condition.RDS')
groupSize <- as.numeric(table(cellchat$Untreated@idents))
netVisual_circle(cellchat$Untreated@net$weight, vertex.weight = groupSize,
weight.scale = T, label.edge= F, title.name = "Interaction weights/strength")
groupSize <- as.numeric(table(cellchat$DSS@idents))
netVisual_circle(cellchat$DSS@net$weight, vertex.weight = groupSize,
weight.scale = T, label.edge= F, title.name = "Interaction weights/strength")
groupSize <- as.numeric(table(cellchat$Recovery@idents))
netVisual_circle(cellchat$Recovery@net$weight, vertex.weight = groupSize,
weight.scale = T, label.edge= F, title.name = "Interaction weights/strength")
netVisual_heatmap(cellchat$Untreated, color.heatmap = "Reds", measure = 'weight')
netVisual_heatmap(cellchat$DSS, color.heatmap = "Reds", measure = 'weight')
netVisual_heatmap(cellchat$Recovery, color.heatmap = "Reds", measure = 'weight')
obj <- cellchat$Untreated
paths <- obj@netP$pathways
netAnalysis_contribution(obj, signaling = paths)
obj <- cellchat$DSS
paths <- obj@netP$pathways
netAnalysis_contribution(obj, signaling = paths)
obj <- cellchat$Recovery
paths <- obj@netP$pathways
netAnalysis_contribution(obj, signaling = paths)
obj <- cellchat$Untreated
netVisual_chord_gene(obj, slot.name = "netP", legend.pos.x = 10, lab.cex = 0.4)
obj <- cellchat$DSS
netVisual_chord_gene(obj, slot.name = "netP", legend.pos.x = 10, lab.cex = 0.4)
obj <- cellchat$Recovery
netVisual_chord_gene(obj, slot.name = "netP", legend.pos.x = 10, lab.cex = 0.4)
cellchat <- sapply(simplify = F, cellchat, function(obj) {
netAnalysis_computeCentrality(obj, slot.name = "netP")
})
obj <- cellchat$Untreated
netAnalysis_signalingRole_heatmap(obj, pattern = "outgoing", color.heatmap = 'Reds',
height = 15, width = 20)
obj <- cellchat$DSS
netAnalysis_signalingRole_heatmap(obj, pattern = "outgoing", color.heatmap = 'Reds',
height = 15, width = 20)
obj <- cellchat$Recovery
netAnalysis_signalingRole_heatmap(obj, pattern = "outgoing", color.heatmap = 'Reds',
height = 15, width = 20)
obj <- cellchat$Untreated
netAnalysis_signalingRole_heatmap(obj, pattern = "incoming", color.heatmap = 'Reds',
height = 15, width = 20)
obj <- cellchat$DSS
netAnalysis_signalingRole_heatmap(obj, pattern = "incoming", color.heatmap = 'Reds',
height = 15, width = 20)
obj <- cellchat$Recovery
netAnalysis_signalingRole_heatmap(obj, pattern = "incoming", color.heatmap = 'Reds',
height = 15, width = 20)
nPatterns = 4
cellchat <- sapply(simplify = F, cellchat, function(obj) {
identifyCommunicationPatterns(obj, pattern = "incoming", k = nPatterns, heatmap.show = F)
})
obj <- cellchat$Untreated
netAnalysis_river(obj, pattern = "incoming")
obj <- cellchat$DSS
netAnalysis_river(obj, pattern = "incoming")
obj <- cellchat$Recovery
netAnalysis_river(obj, pattern = "incoming")
nPatterns = 4
cellchat <- sapply(simplify = F, cellchat, function(obj) {
identifyCommunicationPatterns(obj, pattern = "outgoing", k = nPatterns, heatmap.show = F)
})
obj <- cellchat$Untreated
netAnalysis_river(obj, pattern = "outgoing")
obj <- cellchat$DSS
netAnalysis_river(obj, pattern = "outgoing")
obj <- cellchat$Recovery
netAnalysis_river(obj, pattern = "outgoing")